aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/[id].js
blob: 514e5d692b26e26d715f3d6a34197eb741663f66 (plain) (blame)
1
2
3
4
5
6
7
8
9
import { get } from '$lib/utils';

export async function GET({ params }) {
	let { id } = params;
	let res = await get(`/invoice?uuid=${id}`);
	let { amount, rate, text, user: { username }} = await get(`/invoice?uuid=${id}`);

	return { body: { amount, rate, username, text } };
}